package com.briup.day04;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * @author 谭梦寻
 * @version 1.1
 * 从键盘中输入月份 判断属于哪个季节
 */
public class Test05 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
//        异常捕获
        try {
            System.out.print("请输⼊⼀个⽉份：");

            int mouth = sc.nextInt();
            if (mouth>0&&mouth<=3) {

                System.out.println("春季");
            }else if (mouth>3&&mouth<=6) {
                System.out.println("夏季");
            }else if (mouth>6&&mouth<=9) {
                System.out.println("夏季");
            }else if (mouth>9&&mouth<=12){
                System.out.println("冬季");
            }else {
                System.out.println("输入有误！");
            }
        } catch (InputMismatchException e) {
            System.out.println("输入的不是整数");
//            System.out.println(e);
        }

    }
}
